<script setup lang="ts">
// 服务列表数据
const services = [
  {
    id: 1,
    title: '技术咨询',
    description: '提供专业的技术方案咨询和评估，帮助企业选择最适合的技术架构和解决方案。',
    icon: '💡',
    benefits: [
      '定制化技术方案设计',
      '技术可行性评估',
      '架构优化建议',
      '技术选型指导'
    ]
  },
  {
    id: 2,
    title: '实施部署',
    description: '提供全面的产品实施和部署服务，确保系统快速、稳定地投入使用。',
    icon: '🚀',
    benefits: [
      '专业部署规划',
      '系统配置和集成',
      '数据迁移服务',
      '上线前测试验证'
    ]
  },
  {
    id: 3,
    title: '培训支持',
    description: '提供系统操作和维护培训，帮助用户快速掌握产品功能，提升使用效率。',
    icon: '📚',
    benefits: [
      '定制化培训课程',
      '在线和现场培训',
      '培训资料提供',
      '认证考核服务'
    ]
  },
  {
    id: 4,
    title: '技术支持',
    description: '提供7×24小时技术支持服务，及时解决用户在使用过程中遇到的问题。',
    icon: '🛠️',
    benefits: [
      '多渠道支持入口',
      '快速响应机制',
      '问题跟踪管理',
      '定期系统巡检'
    ]
  },
  {
    id: 5,
    title: '系统维护',
    description: '提供系统日常维护和优化服务，确保系统稳定运行，性能持续提升。',
    icon: '🔧',
    benefits: [
      '定期补丁更新',
      '性能监控优化',
      '安全漏洞修复',
      '系统健康检查'
    ]
  },
  {
    id: 6,
    title: '定制开发',
    description: '根据企业特定需求，提供定制化功能开发服务，满足个性化业务场景。',
    icon: '🎯',
    benefits: [
      '需求深度调研',
      '定制功能开发',
      '无缝集成对接',
      '持续迭代优化'
    ]
  }
]

// 服务流程数据
const serviceProcess = [
  {
    step: 1,
    title: '需求咨询',
    description: '联系我们，详细描述您的服务需求和业务场景'
  },
  {
    step: 2,
    title: '方案定制',
    description: '根据您的需求，制定个性化的服务方案和实施计划'
  },
  {
    step: 3,
    title: '服务实施',
    description: '专业团队按照计划，高效实施各项服务内容'
  },
  {
    step: 4,
    title: '效果评估',
    description: '服务完成后，进行效果评估和用户满意度调查'
  },
  {
    step: 5,
    title: '持续优化',
    description: '根据反馈持续优化服务，提供长期支持保障'
  }
]

// 常见问题数据
const faqs = [
  {
    question: '如何申请技术支持服务？',
    answer: '您可以通过官方网站的在线客服、服务热线电话或邮件等多种方式联系我们申请技术支持。我们的客服人员会在收到申请后15分钟内与您取得联系，并根据问题紧急程度安排相应级别的支持。'
  },
  {
    question: '服务响应时间有什么保障？',
    answer: '我们提供不同级别的服务响应承诺：标准支持为4小时内响应，紧急支持为1小时内响应，VIP客户享受30分钟内响应特权。所有服务请求都会有专属客户经理全程跟进，确保问题得到及时解决。'
  },
  {
    question: '培训服务可以定制吗？',
    answer: '是的，我们的培训服务完全可以根据客户需求进行定制。我们会先进行需求调研，了解参训人员的技术背景和学习目标，然后设计针对性的培训课程，包括理论讲解、实操演示和案例分析等环节。'
  },
  {
    question: '系统维护包括哪些具体内容？',
    answer: '系统维护服务包括定期的系统补丁更新、性能监控和优化、安全漏洞扫描和修复、数据备份和恢复测试、系统健康状态检查等内容。我们会提供详细的维护报告，让您清晰了解系统运行状况。'
  },
  {
    question: '定制开发的周期一般是多久？',
    answer: '定制开发的周期取决于需求复杂度和功能范围，通常简单的功能定制需要2-4周，中等复杂度的项目需要1-3个月，大型复杂项目可能需要3-6个月。我们会在立项时提供详细的时间规划，并定期汇报开发进度。'
  },
  {
    question: '可以提供驻场服务吗？',
    answer: '是的，对于有特殊需求的客户，我们可以提供专业技术人员驻场服务。驻场人员将直接融入您的团队，提供更及时、更深入的技术支持和协作。具体驻场安排和费用可以根据实际需求进行协商。'
  }
]

// 展开的FAQ索引
const expandedFaq = ref(null)

// 切换FAQ展开状态
const toggleFaq = (index) => {
  expandedFaq.value = expandedFaq.value === index ? null : index
}
</script>

<template>
  <div class="services-page">
    <!-- 页面标题 -->
    <section class="page-header">
      <h1>服务支持</h1>
      <p>专业、高效、全方位的服务体系，为您的业务保驾护航</p>
    </section>

    <!-- 服务介绍 -->
    <section class="services-intro">
      <div class="card intro-card">
        <div class="intro-content">
          <h2>我们的服务理念</h2>
          <p>我们始终坚持以客户为中心的服务理念，致力于为客户提供专业、高效、全方位的服务支持。无论您在使用过程中遇到任何问题，我们都会迅速响应并提供最佳解决方案，确保您的业务稳定运行和持续发展。</p>
          <p>我们的服务团队由经验丰富的技术专家组成，他们不仅具备扎实的专业知识，还拥有丰富的项目实战经验，能够应对各种复杂的技术挑战。</p>
        </div>
        <div class="intro-stats">
          <div class="stat-item">
            <div class="stat-number">99.9%</div>
            <div class="stat-label">服务可用性</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">7×24h</div>
            <div class="stat-label">全天候支持</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">15分钟</div>
            <div class="stat-label">快速响应</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">1000+</div>
            <div class="stat-label">成功案例</div>
          </div>
        </div>
      </div>
    </section>

    <!-- 服务列表 -->
    <section class="services-section">
      <div class="section-header">
        <h2>服务内容</h2>
        <p>全面的服务体系，满足您的多样化需求</p>
      </div>
      <div class="services-grid">
        <div 
          v-for="service in services" 
          :key="service.id" 
          class="card service-card"
        >
          <div class="service-icon">{{ service.icon }}</div>
          <h3>{{ service.title }}</h3>
          <p class="service-description">{{ service.description }}</p>
          <div class="service-benefits">
            <ul>
              <li v-for="(benefit, index) in service.benefits" :key="index">
                {{ benefit }}
              </li>
            </ul>
          </div>
          <button class="service-btn">了解更多</button>
        </div>
      </div>
    </section>

    <!-- 服务流程 -->
    <section class="process-section">
      <div class="section-header">
        <h2>服务流程</h2>
        <p>标准化的服务流程，确保服务质量和效率</p>
      </div>
      <div class="process-container">
        <div 
          v-for="(process, index) in serviceProcess" 
          :key="index" 
          class="process-item"
        >
          <div class="process-step">
            <div class="step-number">{{ process.step }}</div>
          </div>
          <div class="process-content">
            <h3>{{ process.title }}</h3>
            <p>{{ process.description }}</p>
          </div>
          <div v-if="index < serviceProcess.length - 1" class="process-connector"></div>
        </div>
      </div>
    </section>

    <!-- 常见问题 -->
    <section class="faq-section">
      <div class="section-header">
        <h2>常见问题</h2>
        <p>解答您可能关心的问题</p>
      </div>
      <div class="faq-container">
        <div 
          v-for="(faq, index) in faqs" 
          :key="index" 
          class="faq-item"
          :class="{ expanded: expandedFaq === index }"
          @click="toggleFaq(index)"
        >
          <div class="faq-question">
            <span>{{ faq.question }}</span>
            <span class="faq-icon">{{ expandedFaq === index ? '−' : '+' }}</span>
          </div>
          <div class="faq-answer">
            {{ faq.answer }}
          </div>
        </div>
      </div>
    </section>

    <!-- 联系我们 -->
    <section class="contact-section">
      <div class="card contact-card">
        <div class="contact-content">
          <h2>需要帮助？联系我们</h2>
          <p>无论您有任何问题或需求，都可以通过以下方式联系我们的服务团队</p>
          <div class="contact-info">
            <div class="contact-item">
              <span class="contact-icon">📞</span>
              <span class="contact-text">服务热线：400-123-4567</span>
            </div>
            <div class="contact-item">
              <span class="contact-icon">✉️</span>
              <span class="contact-text">邮箱：service@example.com</span>
            </div>
            <div class="contact-item">
              <span class="contact-icon">💬</span>
              <span class="contact-text">在线客服：工作日 9:00-18:00</span>
            </div>
          </div>
        </div>
        <div class="contact-action">
          <button class="contact-btn">立即联系</button>
        </div>
      </div>
    </section>
  </div>
</template>

<style scoped>
.services-page {
  width: 100%;
}

/* 页面标题 */
.page-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 60px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin-top: 30px;
}

.page-header h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
}

.page-header p {
  font-size: 18px;
  opacity: 0.9;
}

/* 服务介绍 */
.services-intro {
  margin-bottom: 80px;
}

.intro-card {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.intro-content {
  flex: 1;
  min-width: 300px;
}

.intro-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
  position: relative;
  display: inline-block;
}

.intro-content h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.intro-content p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.8;
}

.intro-stats {
  flex: 1;
  min-width: 300px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-10px);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  opacity: 0.9;
}

/* 通用标题样式 */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.section-header p {
  font-size: 16px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* 服务列表 */
.services-section {
  margin-bottom: 80px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 20px;
  text-align: center;
}

.service-card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.service-description {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.service-benefits {
  margin-bottom: 25px;
}

.service-benefits ul {
  list-style: none;
  padding: 0;
}

.service-benefits li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

.service-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

.service-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 服务流程 */
.process-section {
  margin-bottom: 80px;
}

.process-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.process-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
}

.process-step {
  flex-shrink: 0;
  margin-right: 30px;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.process-content {
  flex: 1;
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.process-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.process-content p {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

.process-connector {
  position: absolute;
  left: 30px;
  top: 60px;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
  transform: translateX(-50%);
}

/* 常见问题 */
.faq-section {
  margin-bottom: 80px;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #667eea;
}

.faq-item.expanded {
  border-color: #667eea;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background: white;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background: #f8f9fa;
}

.faq-question span {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.faq-icon {
  font-size: 20px;
  font-weight: bold;
  color: #667eea;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #f8f9fa;
}

.faq-item.expanded .faq-answer {
  max-height: 500px;
  padding: 20px;
}

.faq-answer p {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

/* 联系我们 */
.contact-section {
  margin-bottom: 60px;
}

.contact-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  padding: 40px;
  border-radius: 12px;
}

.contact-content {
  flex: 1;
  min-width: 300px;
}

.contact-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.contact-content p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
}

.contact-icon {
  font-size: 24px;
}

.contact-action {
  flex-shrink: 0;
}

.contact-btn {
  padding: 15px 40px;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-header {
    padding: 40px 0;
  }
  
  .page-header h1 {
    font-size: 36px;
  }
  
  .intro-card,
  .contact-card {
    flex-direction: column;
    text-align: center;
  }
  
  .intro-content h2,
  .section-header h2,
  .contact-content h2 {
    font-size: 28px;
  }
  
  .intro-stats {
    width: 100%;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .process-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .process-step {
    margin-right: 0;
    margin-bottom: 20px;
  }
  
  .process-connector {
    left: 50%;
    top: 80px;
    height: 40px;
  }
  
  .contact-info {
    align-items: center;
  }
}
</style>